<%
	layout("/layout.html",{title:session.user.nickname+"的相册"}){
%>
	<style type="text/css">
		.thumbnail{
			position: relative;	
		}
		.thumbnail .pic-num{
			color: white;
			position: absolute;
			font-size: 36px;
			font-weight: bolder;
			top: 5px;
			left: 5px;
		}
	</style>
	<div class="row">
		<div class="col-md-2">
			<div class="btn-group btn-group-justified visible-xs visible-sm mb20">
				<a class="btn btn-default" href="${ctx}/u/account">帐号</a>
				<a class="btn btn-default active" href="${ctx}/u/gallery">相册</a>
				<a class="btn btn-default disabled">游记</a>
				<a class="btn btn-default disabled">活动</a>
			</div>
			<div class="btn-group-vertical hidden-xs hidden-sm" style="width:100%;">
				<a class="btn btn-default" href="${ctx}/u/account">帐号</a>
				<a class="btn btn-default active" href="${ctx}/u/gallery">相册</a>
				<a class="btn btn-default disabled">游记</a>
				<a class="btn btn-default disabled">活动</a>
			</div>
		</div>
		<div class="col-md-10">
			<p><a class="btn btn-default" href="${ctx}/g/add">
				<span class="glyphicon glyphicon-plus">&nbsp;创建新相册</span>
			</a></p>
			<div class="row">
				<%for(gallery in page.list){
					var cover = gallery.cover;
				%>
				
				<div class="col-xs-6 col-sm-3 col-md-2">
					<div class="thumbnail">
				      <div class="pic-num">${photoCount}</div>
				      <%if(isEmpty(cover)){%>
				      <img src="${ctx}/static/img/gallery-cover.jpg" alt="封面">
				      <%}else{%>
				      <img src="${cover.url}" alt="封面">
				      <%}%>
				      <div class="caption">
				      	<p>${gallery.title}</p>
				      </div>
				    </div>
				</div>
				<%}elsefor{%>
				<div class="container-fluid">没有记录</div>
				<%}%>
			</div>
			${pageLink}
		</div>
	</div>
<%}%>